<#import "/spring.ftl" as spring/>
<html>
<head>
	<title><@spring.message "login.index.title"/></title>
	<link rel="stylesheet" type="text/css" href="${res}/js/ext/resources/css/ext-all.css" />
	<script type="text/javascript" src="${res}/js/ext/adapter/ext/ext-base.js"></script>
	<script type="text/javascript" src="${res}/js/ext/ext-all.js"></script>
	
	<script type="text/javascript">
		Ext.onReady(function() {
			var panel = new Ext.Panel( {
				title : '<@spring.message "login.index.title"/>',
				width : 400,
				height : 300,
				items : [ {
					xtype : 'form',
					items : [ {
						fieldLabel : '用户名',
						xtype : 'textfield'
					}, {
						fieldLabel : '密码',
						xtype : 'textfield',
						inputType : 'password'
					} ]
				} ],
				buttons:[{text:'登录'},{text:'取消'}]
			});
			var windowWidth = window.screen.availWidth;
			var left = (windowWidth - panel.width) / 2;
			var style = 'margin-top:150px;margin-left:' + left + 'px;';
			var el = Ext.get('div-id').applyStyles(style);
			panel.render(el);
		});
	</script>
</head>
<body>
<div id="div-id"></div>

</body>
</html>